diff options
| author | John Barratt <[email protected]> | 2023-03-07 10:29:49 -0800 |
|---|---|---|
| committer | John Barratt <[email protected]> | 2023-03-07 10:29:49 -0800 |
| commit | 8ef9568cd1bd822495ce005d4e4cfaa6cb0d92ce (patch) | |
| tree | 4ea5530cc2b7e5d970dc8a84cacfecfe2cce46b7 /src/routes/(app)/[username]/settings | |
| parent | c97fb43abba375920fff361ec5fa4eb64a5a0d3f (diff) | |
| parent | 0f44e3283c25c9783a52cf20957661da49d2f90b (diff) | |
| download | coinos-ui-notifications.tar.gz coinos-ui-notifications.zip | |
Merge branch 'master' of https://github.com/coinos/coinos-ui into notificationsnotifications
Diffstat (limited to 'src/routes/(app)/[username]/settings')
| -rw-r--r-- | src/routes/(app)/[username]/settings/[...tab]/+page.server.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/routes/(app)/[username]/settings/[...tab]/+page.server.js b/src/routes/(app)/[username]/settings/[...tab]/+page.server.js index 361a9f85..535c588f 100644 --- a/src/routes/(app)/[username]/settings/[...tab]/+page.server.js +++ b/src/routes/(app)/[username]/settings/[...tab]/+page.server.js @@ -1,5 +1,5 @@ import { fail, redirect } from '@sveltejs/kit'; -import { auth, get, post } from '$lib/utils'; +import { fd, auth, get, post } from '$lib/utils'; export function load({ params, url }) { if (url.pathname.endsWith('settings')) throw redirect(307, url.pathname + '/account'); @@ -7,8 +7,9 @@ export function load({ params, url }) { } export const actions = { - save: async ({ cookies, request }) => { - let form = Object.fromEntries(await request.formData()); + default: async ({ cookies, request }) => { + let form = await fd(request); + form.prompt = form.prompt === 'on'; let user = { ...(await get('/me', auth(cookies))), ...form }; try { |
